<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--[if IE 9 ]><html class="ie9"><![endif]-->
    <head>
        <%@ include file="../frame_head.jsp" %>
            
        <!-- CSS -->
        <link href="${pageContext.request.contextPath }/css_b/bootstrap.min.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath }/css_b/animate.min.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath }/css_b/font-awesome.min.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath }/css_b/form.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath }/css_b/calendar.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath }/css_b/media-player.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath }/css_b/style.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath }/css_b/icons.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath }/css_b/generics.css" rel="stylesheet"> 
    </head>
    <body id="skin-blur-violate">
        <!-- header -->
        <%@ include file="../frame_header.jsp" %>
        
        <section id="main" class="p-relative" role="main">
	        <!-- Sidebar -->
	        <%@ include file="../frame_aside.jsp" %>
          
            <!-- Content -->
            <section id="content" class="container">
		        <!-- Breadcrumb -->
				<ol class="breadcrumb hidden-xs">
				    <li><a href="#">主页</a></li>
				    <li class="active">数据</li>
				</ol>
				
				<h4 class="page-title">列表</h4>
                
                <!-- Deafult Table -->
                <div class="block-area" id="defaultStyle">
                    <h3 class="block-title">二级分类列表</h3>
                    <form action="">
                    <table class="table tile""> 
                        <thead>
                            <tr style="">
                            <!-- 
                                <td style="text-align: center">序号</td>
                                <td style="text-align: center">二级分类ID</td>
                                <td style="text-align: center">二级分类名称</td>
                                <td style="text-align: center">编辑</td>
                                <td style="text-align: center">删除</td>
                                 -->
                                 <th colspan="5">
				          			<div style="display: -webkit-box;text-align: center" >
				                    	<div style="display：block; -webkit-box-flex:1; width:0%;">序号</div>
				                    	<div style="display：block; -webkit-box-flex:1; width:0%;">二级分类ID</div>
				                    	<div style="display：block; -webkit-box-flex:1; width:0%;">二级分类名称</div>
				                    	<div style="display：block; -webkit-box-flex:1; width:0%;">编辑</div>
				                    	<div style="display：block; -webkit-box-flex:1; width:0%;">删除</div>
				                    </div>
                                 </th>
                            </tr>
                        </thead>
                        <tbody>
                            <s:iterator var="cs" value="pageBean.List" status="status">
                            		<tr style="white-space: nowrap;">
				          				<td colspan="5">
					          			<div style="display: -webkit-box;text-align: center" >
					                    	<div style="display：block; -webkit-box-flex:1; width:0%;">
					                    		<s:property value="#status.count"/>
					                    	</div>
					                    	<div style="display：block; -webkit-box-flex:1; width:0%;">
					                    		<font color="orange"><s:property value="#cs.csid"/></font>
											</div>
					                    	<div style="display：block; -webkit-box-flex:1; width:0%;">
					                    			<font color="orange"><s:property value="#cs.csname"/></font>
					                    	</div>
					                    	<div style="display：block; -webkit-box-flex:1; width:0%;">
						                    	<a href="${pageContext.request.contextPath}/adminCategorySecond_edit.action?csid=<s:property value="#cs.csid"/>">
													<img src="${pageContext.request.contextPath}/images/i_edit.png" width="16" height="16" border="0" style="CURSOR: hand">
												</a>
					                    	</div>
					                    	<div style="display：block; -webkit-box-flex:1; width:0%;">
					                    		<a href="#" onclick="deleteCategorySecond(<s:property value="#cs.csid"/>)">
													<img src="${pageContext.request.contextPath}/images/i_del.jpg" width="16" height="16" border="0" style="CURSOR: hand">
												</a>
											</div>
					                    </div>
					          				</td>
                            		</tr>
			                  <!--   
								<tr >
									<td style="CURSOR: hand; HEIGHT: 22px" align="center"
										>
										<s:property value="#status.count"/>
									</td>
									<td style="CURSOR: hand; HEIGHT: 22px" align="center"
										>
										<s:property value="#cs.csid"/>
									</td>
									<td style="CURSOR: hand; HEIGHT: 22px" align="center"
										>
										<s:property value="#cs.csname"/>
									</td>
									<td align="center" style="HEIGHT: 22px">
										<a href="${pageContext.request.contextPath}/adminCategorySecond_edit.action?cid=<s:property value="#cs.csid"/>">
											<img src="${pageContext.request.contextPath}/images/i_edit.png" width="16" height="16" border="0" style="CURSOR: hand">
										</a>
									</td>
									<td align="center" style="HEIGHT: 22px">
										<a href="${pageContext.request.contextPath}/adminCategorySecond_delete.action?cid=<s:property value="#cs.csid"/>">
											<img src="${pageContext.request.contextPath}/images/i_del.jpg" width="16" height="16" border="0" style="CURSOR: hand">
										</a>
									</td>
								</tr>
							  -->
							</s:iterator>	
                        </tbody>  
                    </table>
                    <!-- 
                    <div style="display: -webkit-box; background-color: green;" >
                    	<div style="display：block; -webkit-box-flex:1; background-color: red; width:0%;">AAAA</div>
                    	<div style="display：block; -webkit-box-flex:1; background-color: blue; width:0%;">SSSS</div>
                    	<div style="display：block; -webkit-box-flex:1; background-color: red; width:0%;">DD</div>
                    	<div style="display：block; -webkit-box-flex:1; background-color: blue; width:0%;">FF</div>
                    	<div style="display：block; -webkit-box-flex:1; background-color: red; width:0%;">GGGGGFG</div>
                    	<div style="display：block; -webkit-box-flex:1; background-color: blue; width:0%;">GGGGGFG</div>
                    	<div style="display：block; -webkit-box-flex:1; background-color: red; width:0%;">GGGGGFG</div>
                    	<div style="display：block; -webkit-box-flex:1; background-color: blue; width:0%;">GGGGGFG</div>
                    	<div style="display：block; -webkit-box-flex:1; background-color: red; width:0%;">GGGGGFG</div>
                    	<div style="display：block; -webkit-box-flex:1; background-color: blue; width:0%;">GGGGGFG</div>
                    </div>
                   -->
                    
                    <center>
                   		<button type="button" id="add" name="add" value="添加" onclick="addCategorySecond()" class="btn btn-sm m-r-5">添加二级分类</button>
						<p />
						<div>
							第<s:property value="pageBean.pageNo"/>/<s:property value="pageBean.totalPageNo"/>页&nbsp;&nbsp;&nbsp;&nbsp;
							<s:if test="pageBean.pageNo != 1">
								<a href="${pageContext.request.contextPath }/adminCategorySecond_findAll.action?pageNo=1">首页</a>|
								<a href="${pageContext.request.contextPath }/adminCategorySecond_findAll.action?pageNo=<s:property value="pageBean.pageNo - 1"/>">上一页</a>|
							</s:if>
							<s:if test="pageBean.pageNo != pageBean.totalPageNo">
								<a href="${pageContext.request.contextPath }/adminCategorySecond_findAll.action?pageNo=<s:property value="pageBean.pageNo + 1"/>">下一页</a>|
								<a href="${pageContext.request.contextPath }/adminCategorySecond_findAll.action?pageNo=<s:property value="pageBean.totalPageNo"/>">尾页</a>
							</s:if>
						</div>
                    </center>
                   </form>
                </div>
            </section>
            <br/><br/>
        </section>
        
        <!-- Javascript Libraries -->
        <!-- jQuery -->
        <script src="${pageContext.request.contextPath }/js/jquery.min.js"></script> <!-- jQuery Library -->
        
        <!-- Bootstrap -->
        <script src="${pageContext.request.contextPath }/js/bootstrap.min.js"></script>
        
        <!-- UX -->
        <script src="${pageContext.request.contextPath }/js/scroll.min.js"></script> <!-- Custom Scrollbar -->
        
        <!-- Other -->
        <script src="${pageContext.request.contextPath }/js/calendar.min.js"></script> <!-- Calendar -->
        <script src="${pageContext.request.contextPath }/js/feeds.min.js"></script> <!-- News Feeds -->
        
        
        <!-- All JS functions -->
        <script src="${pageContext.request.contextPath }/js/functions.js"></script>
        
        <!-- From JS -->
    	<script language="javascript" src="${pageContext.request.contextPath}/js/public.js"></script>
    	<script type="text/javascript">
			function deleteCategorySecond(csid){
				if(confirm("确定要删除该二级分类？")){
					window.location.href = "${pageContext.request.contextPath}/adminCategorySecond_delete.action?csid=" + csid;
				}
			}
			
		</script>
		<script type="text/javascript">
			function addCategorySecond(){
				window.location.href = "${pageContext.request.contextPath}/adminCategorySecond_addPage.action";
			}
		</script>
    </body>
</html>

